package system

import (
	"context"

	v1 "go_admin/api/system/v1"
	"go_admin/internal/service"
)

func (c *ControllerV1) SysOperLogList(ctx context.Context, req *v1.SysOperLogListReq) (res *v1.SysOperLogListRes, err error) {
	res, err = service.SysOperLog().List(ctx, req)
	return
}
func (c *ControllerV1) SysOperLogGet(ctx context.Context, req *v1.SysOperLogGetReq) (res *v1.SysOperLogGetRes, err error) {
	res = new(v1.SysOperLogGetRes)
	res.SysOperLogInfoRes, err = service.SysOperLog().GetByOperId(ctx, req.OperId)
	return
}
func (c *ControllerV1) SysOperLogDelete(ctx context.Context, req *v1.SysOperLogDeleteReq) (res *v1.SysOperLogDeleteRes, err error) {
	err = service.SysOperLog().DeleteByIds(ctx, req.OperIds)
	return
}
func (c *ControllerV1) SysOperLogClear(ctx context.Context, req *v1.SysOperLogClearReq) (res *v1.SysOperLogClearRes, err error) {
	err = service.SysOperLog().ClearLog(ctx)
	return
}
